import { ProCard, ProColumns, ProTable } from "@ant-design/pro-components";

const App:React.FC=()=>{
     interface DataType{
        code?:string,name?:string,iotype?:string,degree?:string,memo?:string,ddate?:string,quantity?:number,
        invstd?:string,munit_name?:string,dep_name?:string,operater_name?:string,status?:string,type?:string,
     };

     const columns:ProColumns<DataType>[]=[
        {dataIndex:'code',title:'工装夹具编码'},{dataIndex:'name',title:'名称'},{dataIndex:'degree',title:'等级'},
         {dataIndex:'invstd',title:'规格'},{dataIndex:'munit_name',title:'单位'},{dataIndex:'quantity',title:'申请数量'},
        {dataIndex:'type',title:'用途'},
        {dataIndex:'dep_name',title:'申请部门'},{dataIndex:'operater_name',title:'申请人'},
        {dataIndex:'ddate',title:'申请日期',valueType:'date'},
        
     ];

     const tdata:DataType[]=[
        {code:'A00199',name:'传动齿轮',type:'生产',degree:'备品备件A级',invstd:'TC0012-3',munit_name:'只',
            quantity:2,dep_name:'机加工车间',operater_name:'张小非',ddate:'2023-10-01',},
            {code:'CM66001',name:'PLC通讯组件',type:'维修',degree:'备品备件A级',invstd:'FNK89263',munit_name:'只',
                quantity:2,dep_name:'机加工车间',operater_name:'张小非',ddate:'2023-10-02',},
                {code:'A001',name:'辊轴',type:'外发维修',degree:'备品备件A级',invstd:'TC0012-3',munit_name:'只',
                    quantity:2,dep_name:'机加工车间',operater_name:'吴军',ddate:'2023-10-03',},
                    {code:'A001',name:'**工具',type:'生产',degree:'工装夹具A级',invstd:'TC0012-3',munit_name:'只',
                        quantity:2,dep_name:'喷漆车间',operater_name:'李卫卫',ddate:'2023-10-05',},
      
     ];

    return <>
         <ProCard title='工装夹具领用申请' style={{height:700}}
         >
             <ProTable<DataType>
                search={false}
                options={false}
                columns={columns}
                dataSource={tdata}

                />
         </ProCard>
    </>;
};

export default App;